import { getMemberlist } from "../../../require/api";

const state = {
    memberList: []
}
const getters = {
    getMember(state) {
        return state.memberList
    }
}

const mutations = {
    GMEMBERLIST(state, payload) {
        state.memberList = payload
    }
}

const actions = {
    getMemberAction({ commit }) {
        getMemberlist().then(res => {
            // console.log(res);
            if (res.code == 200) {
                commit('GMEMBERLIST', res.list)
            }
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
    //命名空间

}